<?php

if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 产品服务详情
 */
 
class ProductDetailsAction extends M_Controller {

    /**
     * 构造函数
     */
    public function __construct() {
        parent::__construct();
    }
	
    /**
     * 程序执行部分
     */
    public function index() {
		include("/extra/fun/inc.php");
		include("/extra/fun/mysql.fun.php");
        $id= $_REQUEST['id'];
		$sql_0="update dr_1_product set hits=hits+1 where id={$id}";
		query($sql_0);
		$sql_1="select * from dr_1_product pl,dr_1_product_data_0 pd where pl.id=pd.id and pl.id={$id}";
		$result=query($sql_1);
		while($rs=mysql_fetch_array($result)){
			echo '
			<h1>'.$rs["title"].'</h1>
			<div class="author">
				<span>发布者：'.$rs["author"].'</span>
				<span>发布时间：'.date("Y-m-d",$rs["updatetime"]).'</span>
				<span>点击次数：'.$rs["hits"].'</span>
			</div>
			<div class="ct">
				<div class="img"><img src="'.dr_get_file($rs["thumb"]).'" alt="" /></div>
				<div class="txt">'.$rs["content"].'</div>
			</div>
			';
		}
		
	}
}